import request from '@/utils/request'

export function getAbilities(data) {
	return request({
		url: '/abilities',
		method: 'get',
		params: data
	})
}

export function getAbilityGroups() {
	return request({
		url: '/ability-groups',
		method: 'get'
	})
}

export function addAbility(data) {
	return request({
		url: '/abilities',
		method: 'post',
		data
	})
}

export function updateAbility(id, data) {
	return request({
		url: `/abilities/${id}`,
		method: 'put',
		data
	})
}

export function deleteAbility(id) {
	return request({
		url: `/abilities/${id}`,
		method: 'delete'
	})
}
